include_directories( 
    ${CMAKE_BINARY_DIR} 
    ${CMAKE_SOURCE_DIR}/src/client
    ${CMAKE_BINARY_DIR}/src/client)
SET( CLIENT_SRCS
    buddyitem.cpp
    buddymodel.cpp
    chatwidget.cpp
    chatwindow.cpp
    connecttocoredialog.cpp
    clientxmlparser.cpp
    clientxmlgenerator.cpp
    clientcontroller.cpp
    clientconnection.cpp
    main.cpp
    inputedit.cpp
    roster.cpp
)

SET( CLIENT_MOC_HDRS
    buddymodel.h
    roster.h
    chatwidget.h
    connecttocoredialog.h
    clientxmlparser.h
    clientxmlgenerator.h
    clientcontroller.h
    clientconnection.h
    inputedit.h
)


SET( CLIENT_UIS
    chatwidget.ui
    chatwindow.ui
    roaster.ui
    connecttocoredialog.ui
)


  ## and finally an resource file
  #SET( SAMPLE_RCS
  #     ./src/rc/sample.qrc
  #)
  
  # enable warnings
  ADD_DEFINITIONS( -Wall )
  
  # by default only QtCore and QtGui modules are enabled
  # other modules must be enabled like this:
  SET( QT_USE_QTSQL FALSE )   
  SET( QT_USE_QTXML TRUE )
  SET( QT_USE_QTNETWORK TRUE )
  SET( QT_USE_QTGUI TRUE)
  
  FIND_PACKAGE( Qt4 REQUIRED )
  
  INCLUDE( ${QT_USE_FILE} )
  
  #QT4_ADD_RESOURCES( CORE_RC_SRCS ${CORE_RCS} )
  
  QT4_WRAP_UI( CLIENT_UI_HDRS ${CLIENT_UIS} )  
  QT4_WRAP_CPP( CLIENT_MOC_SRCS ${CLIENT_MOC_HDRS} )

  
  ADD_EXECUTABLE( dichatclient ${CLIENT_SRCS} ${CLIENT_MOC_SRCS} ${CLIENT_UI_HDRS} )
  TARGET_LINK_LIBRARIES( dichatclient ${QT_LIBRARIES} )
